var itemshideshow = [];
    	function change_image_button(id, img_src) {
			document.getElementById(id).src = img_src;
		}
		function change_color_link(id, color) {
		   document.getElementById(id).style.color = color;
		}
		function change_color_menu(id, div_class) {
		   document.getElementById(id).className = div_class;
		}
		function choiceDate(id) {
			$(id).datetimepicker();
		}
		function randomFromTo(from, to){
		   return Math.floor(Math.random() * (to - from + 1) + from);
		}
		function removeView(id, contenthtmlmiddle) {
			var parent = document.getElementById("maincontentlayout");
			var children = parent.getElementsByTagName("div");
			var hidden = document.getElementById("hidden");
			$("#maincontentlogo").fadeOut(0, function() {
			itemshideshow = itemshideshow.splice(0, itemshideshow.length);
			itemshideshow.push("maincontentlogo");
			$("#sublayouttext").fadeOut(0, function() {
			$("#hiddenimage").fadeOut(0, function() {
			$("#hidden").fadeOut(0, function() {
				var count = $("#" + "maincontentlayout" + " div").length;
				var i = 0;
				while (i < count) {
					if(children.item(i).id == "maincontentlogo") {
						break;
					}else if(children.item(i).id == "hidden") {
						i = i+3;
					}else {
						var a = children.item(i).id.substring(0, children.item(i).id.length-1);
						if(a == "postraitspacecontent" || children.item(i).id == "landscapespacecontent") {
							//var abc = document.getElementById(children.item(i).id);
							//parent.removeChild(abc);
							itemshideshow.push(children.item(i).id);
							$("#"+children.item(i).id).fadeOut(500, function() {});
							i= i+1;
						}else {
							if(children.item(i).id == id) {
								itemshideshow.push(children.item(i).id);
								$("#"+children.item(i).id).fadeOut(500, function() {});
								i= i+4;
							}else {
								//var abc = document.getElementById(children.item(i).id);
								//parent.removeChild(abc);
								itemshideshow.push(children.item(i).id);
								$("#"+children.item(i).id).fadeOut(500, function() {});
								i= i+4;
							}
						}
					}
				}
				var buffer = document.getElementById(id);			
				var hiddenimage = document.getElementById("hiddenimage");
				var images = buffer.getElementsByTagName("img");
				var divs = buffer.getElementsByTagName("div");
				
				var stringspilit = images.item(0).src.split('/');
				string_need_replace = stringspilit[stringspilit.length -3] + '/' +  stringspilit[stringspilit.length -2] + '/' + stringspilit[stringspilit.length -1];
				hiddenimage.src = string_need_replace;
				//buffer.removeChild(divs.item(0));
				//buffer.removeChild(divs.item(1));
				
				var html = document.getElementById("sublayouttext");
				var inndex = id.substring(id.length-1, id.length);
				html.innerHTML = contenthtmlmiddle;
				
				hidden.style.position = "relative";
				//buffer.removeChild(divs.item(0));
				$("#hidden").show(500, function() {
					$("#hiddenimage").show(100, function() {});
					$("#sublayouttext").show(500, function() {});
					$("#maincontentlogo").show(100, function() {});
				});
			});
			});
			});
			});
		}
		
		function developfunction(string) {
		}